/*
 * @(#)Operator.java
 *
 * @author      Orlin Tomov
 * 
 */
package dbu.sql;

public enum Operator {

	EQ("="), LIKE("LIKE"), AND("AND"), OR("OR");

	private String operator;

	private Operator(String operator) {
		this.operator = operator;
	}

	@Override
	public String toString() {
		return operator;
	}

	public static Operator find(String expresion) {
		for (Operator operator: values()) {
			if (expresion.contains(operator.toString())) {
				return operator;
			}
		}
		return null;
	}
}
